import Vue from 'vue';
import store from '@/store'

Vue.directive('permission', {
    inserted(el, binding) {
        let permission = store.getters.permission;
        if (permission.indexOf(binding.value) === -1) {
            // 删除节点
            el.remove();
        }
    }
})